/*
* 命名空间: Authority.Model
*
* 功 能： SysOrganization实体类
*
* 类 名： SysOrganizationEntity
*
* Version   变更日期            负责人     变更内容
* ─────────────────────────────────────────────────
* V1.0.1    2020/01/10 14:26:13 罗维     创建
*
* Copyright (c) 2019 Lir Corporation. All rights reserved.
*/

namespace Authority.Model
{
    using System;
    using Tool.Model;

    /// <summary>
    /// 组织机构表
    /// </summary>
    [Serializable]
    [DBTableInfo(TableName = "SysOrganization")]
    public class SysOrganizationEntity
    {
        /// <summary>
        /// 唯一标识符
        /// </summary>
        [DBFieldInfo(ByteLength = 32,DataLength = 32,DecimalDigits = 0,ColumnName = "gCode",Required = true,DefaultValue = "",IsPrimarykey = true)]
        public string gCode
        {
            get; set;
        }

        /// <summary>
        /// 父节点唯一标识符
        /// </summary>
        [DBFieldInfo(ByteLength = 32,DataLength = 32,DecimalDigits = 0,ColumnName = "gParentCode",Required = false,DefaultValue = "",IsPrimarykey = false)]
        public string gParentCode
        {
            get; set;
        }

        /// <summary>
        /// 公司名称
        /// </summary>
        [DBFieldInfo(ByteLength = 100,DataLength =50,DecimalDigits = 0,ColumnName = "sName",Required = true,DefaultValue = "",IsPrimarykey = false)]
        public string sName
        {
            get; set;
        }

        /// <summary>
        /// 加码以后的密码
        /// </summary>
        [DBFieldInfo(ByteLength = 100, DataLength = 50, DecimalDigits = 0, ColumnName = "sEncryptPassword", Required = true, DefaultValue = "", IsPrimarykey = false)]
        public string sEncryptPassword
        {
            get; set;
        }
        
        /// <summary>
        /// 公司简称
        /// </summary>
        [DBFieldInfo(ByteLength = 100, DataLength = 50, DecimalDigits = 0, ColumnName = "sAbbreviation", Required = true, DefaultValue = "", IsPrimarykey = false)]
        public string sAbbreviation
        {
            get; set;
        }
 
        /// <summary>
        /// 组织机构编码
        /// </summary>
        [DBFieldInfo(ByteLength = 8, DataLength = 20, DecimalDigits = 0, ColumnName = "iOrganizationCode", Required = true, DefaultValue = "", IsPrimarykey = false)]
        public long iOrganizationCode
        {
            get; set;
        }

        /// <summary>
        /// 排序
        /// </summary>
        [DBFieldInfo(ByteLength = 4,DataLength = 10,DecimalDigits = 0,ColumnName = "iSort",Required = true,DefaultValue = "",IsPrimarykey = false)]
        public int iSort
        {
            get; set;
        }

        /// <summary>
        /// 负责人
        /// </summary>
        [DBFieldInfo(ByteLength = 40,DataLength = 20,DecimalDigits = 0,ColumnName = "sLeader",Required = true,DefaultValue = "",IsPrimarykey = false)]
        public string sLeader
        {
            get; set;
        }

        /// <summary>
        /// 联系电话
        /// </summary>
        [DBFieldInfo(ByteLength = 40,DataLength = 20,DecimalDigits = 0,ColumnName = "sPhone",Required = true,DefaultValue = "",IsPrimarykey = false)]
        public string sPhone
        {
            get; set;
        }

        /// <summary>
        /// 邮箱
        /// </summary>
        [DBFieldInfo(ByteLength = 200,DataLength = 100,DecimalDigits = 0,ColumnName = "sEmail",Required = false,DefaultValue = "",IsPrimarykey = false)]
        public string sEmail
        {
            get; set;
        }

        /// <summary>
        /// 备注
        /// </summary>
        [DBFieldInfo(ByteLength = 400,DataLength = 200,DecimalDigits = 0,ColumnName = "sContent",Required = false,DefaultValue = "",IsPrimarykey = false)]
        public string sContent
        {
            get; set;
        }

        /// <summary>
        /// 状态 0不启用 1启用
        /// </summary>
        [DBFieldInfo(ByteLength = 1,DataLength = 1,DecimalDigits = 0,ColumnName = "bIsEnabled",Required = false,DefaultValue = "((1))",IsPrimarykey = false)]
        public bool? bIsEnabled
        {
            get; set;
        }

        /// <summary>
        /// 是否被逻辑删除
        /// </summary>
        [DBFieldInfo(ByteLength = 1,DataLength = 1,DecimalDigits = 0,ColumnName = "bIsDeleted",Required = false,DefaultValue = "((0))",IsPrimarykey = false)]
        public bool bIsDeleted
        {
            get; set;
        }


        /// <summary>
        /// 公司状态 0未审核 1审核通过 2审核失败
        /// </summary>
        [DBFieldInfo(ByteLength = 4, DataLength = 10, DecimalDigits = 0, ColumnName = "iStatus", Required = true, DefaultValue = "((0))", IsPrimarykey = false)]
        public int iStatus
        {
            get; set;
        }

    }
}
